<template>
	<view class="xieyi" v-html="datas">
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				status:'',// 1用户协议 2隐私政策
				datas:'',
			};
		},
		onLoad(e) {
			this.status = e.status;
			uni.setNavigationBarTitle({
				title:e.status == '1'?'用户协议':'隐私政策',
			})
		},
		onShareAppMessage() {
			return{
				title:'洗匣士~您的家居窗帘清洗助手',
				path:'/pages/home?spreadId=' + (uni.getStorageSync('userId')?uni.getStorageSync('userId'):''),
				imageUrl:getApp().globalData.imgDomain+'public/logo.png',
				desc:'手机下单 | 专员取送 | 生态环保 | 轻奢洗护',
			}
		},
		onShareTimeline() {
			return{
				title:'洗匣士~您的家居窗帘清洗助手',
				path:'/pages/home?spreadId=' + (uni.getStorageSync('userId')?uni.getStorageSync('userId'):''),
				imageUrl:getApp().globalData.imgDomain+'public/logo.png',
				desc:'手机下单 | 专员取送 | 生态环保 | 轻奢洗护',
			}
		},
		onShow(){
			this.initData();
		},
		methods:{
			initData(){
				this.tool.getData('User/about',{}).then(res=>{
					if(res){
						this.datas = this.status == '1'?res.protocol:res.yinsi;
					}
				}).catch(err=>{
					console.log(err);
				})
			}
		}
	}
</script>

<style lang="scss">
	.xieyi{
		width: 100%;
		padding: 12px 3.2%;
		box-sizing: border-box;
	}
	page{
		background: white;
	}
</style>
